			<%@taglib	uri="http://displaytag.sf.net"              prefix="display" %>
            <%@taglib	uri="http://java.sun.com/jsp/jstl/sql"      prefix="sql"%>
            <%@taglib	uri="http://java.sun.com/jsp/jstl/core"     prefix="c" %>
            <%@taglib	uri="http://struts.apache.org/tags-html"    prefix="html" %>
            <%@taglib	uri="http://struts.apache.org/tags-bean"    prefix="bean" %>
            <%@taglib	uri="http://struts.apache.org/tags-logic"   prefix="logic" %>
            
            <%
            if (request.getParameter("idioma") != null){
                %><%@page import="org.apache.struts.Globals, java.util.Locale"%><%
                if (request.getParameter("idioma").equals("en")){
                    session.setAttribute(Globals.LOCALE_KEY, new Locale("en"));
                    }
                else if (request.getParameter("idioma").equals("es")){
                    session.setAttribute(Globals.LOCALE_KEY, new Locale("es"));
                    }
                else if (request.getParameter("idioma").equals("fr")){
                    session.setAttribute(Globals.LOCALE_KEY, new Locale("fr"));
                    }
                }
            %>

            <script type="text/javascript">
	            <!--
	            function stopRKey(evt) {
	                var evt = (evt) ? evt : ((event) ? event : null);
	                var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
	                if ((evt.keyCode == 13) && (node.type=="text"))  {return false;}
	                }
	            document.onkeypress = stopRKey;
	
	            function impr() {
	                var ventimp = window.open(' ', 'popimpr');
	                ventimp.document.write("<link rel='stylesheet' type='text/css' href='<%=request.getContextPath()%>/recursos/css/celeste.css' /><center>");
	                ventimp.document.write(document.getElementById("page").innerHTML);
	                ventimp.document.close(); ventimp.print(); ventimp.close();
	                }
	
	            function close(){
	                document.getElementById("error").style.display = "none";
	                }
	
	            document.getElementsByTagName("body")[0].setAttribute("onload", "javascript: end();");
	            function end(){
	                if(document.getElementById("error").innerHTML.length == 0)
	                    document.getElementById("error").style.display = "none";
	                else{
	                    var arreglo = document.getElementById("error").innerHTML.split("<br>");
	                    var text = "";
	                    for(var i = 0; i < arreglo.length - 1; i++)
	                        text += "<li>" + arreglo[i] + "</li>";
	                    document.getElementById("error").innerHTML = "<div style='margin-bottom:-30px;'><a href='javascript:close()'><img src='<%=request.getContextPath()%>/recursos/cerrar.png'/></a></div><br/><fieldset>"
	                    + text + "<center><a href='javascript: history.back();'><img src='<%=request.getContextPath()%>/recursos/volver.png' /><span><bean:message key="all.regresar" /></span></a></center><legend align='center'><bean:message key="all.error" /></legend></fieldset></div>";
	                    document.getElementById("error").style.display = "block";
	                    }
	                }

	            $(document).ready(function(){
		            $("input[name='insertar']").click(function(){
		            	$("input[name='method']").val($(this).attr("name"));
		            	$("form").submit();
		            });
		            $("input[name='actualizar']").click(function(){
		            	$("input[name='method']").val($(this).attr("name"));
		            	$("form").submit();
		            });
		            $("input[name='eliminar']").click(function(){
		            	$("input[name='method']").val($(this).attr("name"));
		            	$("form").submit();
		            });
	            });
	            
	            function setForm(){
	            	var a = arguments;
            	    $("form *").each(function() {
            	        if ($(this).attr("name") !== undefined) {
    	            		for (var i = 0; i < a.length; i++){
	            	            if ($(this).attr("name") === a[i]) {
	            	                $(this).val(a[++i]);
	            	            }
	            	        }
	            		}
            	    });
	            }
	            //-->
            </script>